<template>
	<section>
		<!--start 面包屑-->
		<div class="location">
			<el-breadcrumb separator="/">
				<el-breadcrumb-item :to="{path:'/index'}">首页</el-breadcrumb-item>
				<el-breadcrumb-item>{{vue_breadcrumb_info}}</el-breadcrumb-item>
			</el-breadcrumb>
		</div>
		<!--end 面包屑-->
		<!--start content-->
		<div class="wrap" ref="companyWrap">
			<el-button class="fr" @click="portalDocListList" style="position:relative;z-index:999;">返回</el-button>
			<el-row :gutter="20">
				<el-col :span="24">
					<p class="title" style="font-size:20px;">{{vue_portalDocListData.docListTitile}}</p>
					<p class="timeText">时间：{{vue_portalDocListData.createDateStr}}</p>
				</el-col>
			</el-row>
			<el-row :gutter="20">
				<el-col :span="24">
					<div class="detailContent" v-html="vue_portalDocListData.docListContent"></div>
				</el-col>
			</el-row>
		</div>
		<!--end content-->
	</section>
</template>

<script>
	export default {
		computed:{
			docListCode(){
				return this.$store.state.docListCode;
			},
			docPlaceCode(){
				return this.$store.state.docPlaceCode;
			}
		},
		watch:{
			docListCode:function(val){
				this.query_portalDocListData()
			},
		},
		data() {
			return {
				vue_portalDocListData:{},
				vue_breadcrumb_info:''
			}
		},
		methods: {
			//查询公告详情
			query_portalDocListData(){ 
				this.axios({
					method:"GET",
					url:"/v3/portal/docLists/"+this.$store.state.docListCode+"/queryDataAddMessage"
				}).then((res)=>{
					this.vue_portalDocListData = res.data;
					if(this.docPlaceCode=='12300000002'){
						this.vue_breadcrumb_info='系统公告';
					}
					if(this.docPlaceCode=='12300000003'){
						this.vue_breadcrumb_info='升级公告';
					}
					//查询主页右上角未读公告总数量
					this.axios({
					method: 'post',
					url: "/v3/portal/docLists/queryNotReadCount",
					data:{}
				}).then((res) => {
					this.notReadSumCount = res.data.sumInfo.notReadCount;
					this.$store.commit('notReadSumCount',this.notReadSumCount);
				});
				}).catch((err)=>{
					
				})
			},
			
			portalDocListList(){
				if(this.docPlaceCode=='12300000002'){
					this.$router.push({path:"/portalDocListListSystem"});
				}
				if(this.docPlaceCode=='12300000003'){
					this.$router.push({path:"/portalDocListListShengJi"});
				}
				
			}
		},
		mounted() {
			this.query_portalDocListData(); 
		},
	}
</script>

<style scoped>
	*{transition:.2s;}
	section {display: flex;flex-direction: column;flex: 1;}
	div.location {flex: 0 0 10px; padding: 3px 0 15px 0;}
	div.wrap {flex: 1;width: 100%;padding: 10px 20px 0 20px;box-sizing: border-box;background: #fff;}
	.title{font-size:1.2rem;}
	.timeText{color:#b0c0d0;border-bottom:1px solid #eee;padding:5px 0;}
	.detailContent{
		padding-top:20px;
	}
</style>
